package test.y2019.november;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Console;

import java.sql.Timestamp;
import java.util.Date;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2019/11/11 15:36
 */
public class November3 {

    public static void main(String[] args) {

        long time = 1573457819000L;

        Timestamp ts = new Timestamp(time);

        Timestamp result = DateUtil.endOfDay(ts).toTimestamp();

        Console.error(result);
        Console.error(result.getTime());


        DateTime dateTime = new DateTime("2019-11-11 23:59:59", DatePattern.NORM_DATETIME_FORMAT);
        Console.error(dateTime.getTime());

        Date date3 = DateUtil.date(time);
        String ymd = date3.toString().split(" ")[0];

        DateTime last = new DateTime(String.format("%s 23:59:59", ymd), DatePattern.NORM_DATETIME_FORMAT);

        System.out.println(last.getTime());

    }
}
